home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_01_06
/
1n06058a
< prev
next >
Wrap
Text File
|
1990-08-22
|
808b
|
36 lines
/*
* Microsoft C version of Print Screen routine,
* compiled under C 6.0
*/
#include <dos.h>
/* Macro to peek at a specific memory address */
#define peek(addr) (*(unsigned char _far *)addr)
union REGS inregs, outregs;
void main()
{
int status;
/* Call Interrupt 05h to print the screen */
int86( 0x05, &inregs, &outregs );
/* Get value in Print Screen status byte */
status = peek(0x00500000);
if (status == 0) /* Print Screen successful */
exit (0);
else if (status == 1) /* Print Screen in progress */
printf("Screen printing in progress.\n");
else /* Error occured */
{
printf("Error - couldn't print the screen.\n");
exit(0);
}
}